import { UaCard } from "../models/ua-card.model";
import { UaGinryuTimelineEntity } from "../models/ua-timeline-item.entity";
import { GlobalService } from "./global.service";


export class UaTimelineService {
  static PATH = "/ua/timeline";
  static getALl() {
    return new Promise<UaCard[]>(
      (resolve, reject) => {
        wx.request({
          url: `${GlobalService.HOST}${UaTimelineService.PATH}`,
          method: "GET",
          success: (response) => resolve(response.data as UaGinryuTimelineEntity[]),
          fail: (err) => reject(err)
        });
      }
    )
  }
}
